package com.asj.house.controller;

import com.asj.house.client.HouseVisitClient;
import com.asj.house.returns.RespEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * <p>
 * 访问量统计 前端控制器
 * </p>
 *
 * @author asj
 * @since 2021-02-25
 */
@RestController
@RequestMapping("/house-visit")
@Slf4j
@Api(value = "访问量相关接口", tags = "访问量相关接口")
public class HouseVisitController {

    @Resource
    private HouseVisitClient houseVisitClient;

    @GetMapping
    @ApiOperation(value = "日访问量")
    public RespEntity pageView() {
        RespEntity respEntity = houseVisitClient.pageView();
        return respEntity;
    }

}
